<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master" CodeBehind="ByRegion.aspx.cs" Inherits="www.Search_ByRegion" %>

<%@ Register Assembly="NBusiness" Namespace="NBusiness.Data.Web" TagPrefix="cc1" %>

<asp:Content ID="Content1" runat="Server" ContentPlaceHolderID="contentPlaceHolder1">
    <asp:Label ID="Label1" runat="server" OnLoad="Label1_Load" Text="Invalid Region"></asp:Label>
    &nbsp;
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="CompanyId"
        DataSourceID="CompanyDataSource" EmptyDataText="No Companies Found" OnRowDataBound="GridView1_RowDataBound" AllowPaging="True" AllowSorting="True">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="CompanyId" DataNavigateUrlFormatString="~/Company.aspx?c={0}"
                DataTextField="Name" HeaderText="Brewing Company" SortExpression="Name" />
            <asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone" />
            <asp:TemplateField HeaderText="Cities">
                <ItemTemplate>
                    <asp:Label ID="LabelAddress" runat="server" ></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField DataNavigateUrlFields="Url" DataTextField="Url" HeaderText="Website" />
        </Columns>
    </asp:GridView>
    <cc1:entitydatasource id="CompanyDataSource" runat="server" 
        assemblyname="Example.Entities, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"
        onselect="CompanyDataSource_Select" typename="BeerBase.Business.CompanyCollection">
    </cc1:entitydatasource>
</asp:Content>